<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>侧边栏停靠</title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
		<script src="js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<style>
			/*这里两个类之前不能有空格*/
			.affixed-element-top.affix{
				top:10px;
			}
			.affixed-element-top.affix-bottom{
				position: relative;
			}
			
			.affixed-element-bottom.affix{
				bottom: 10px;
			}
			.affixed-element-bottom .affix-bottom{
				position: relative;
			}
			
		</style>
		<div class="container">
			<!--左边栏-->
			<div class="col-md-3">    <!--左边居顶-->
				<ul class="list-group affixed-element-top js-affixed-element-top">
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
				</ul>
			</div>
			
			<!--中间的具体内容-->
			<div class="col-md-6 js-content">
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
				<p>
					德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜德玛西亚正义必胜
				</p>
			</div>
			
			<!--右边的导航-->
			<div class="col-md-3">
				<ul class="list-group affixed-element-bottom js-affixed-element-bottom">
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
					<li class="list-group-item">hello大家好我是德玛</li>
				</ul>
			</div>
		</div>
		
		<script>
			// $(function(){
			// 	$(".js-affixed-element-top").affix({
			// 		offset:{
						
			// 		}
			// 	})
			// 	$(".js-affixed-element-bottom").affix({
			// 		offset:{
						
			// 		}
			// 	})
			// })
			
			// $(".list-group").on("affix.bs.affix",function(){
			// 	alert("hello");
			// })
		</script>
	</body>
</html>
